Keep original queryset on DjangoFilterConnectionField #816
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR #796 broke DjangoFilterConnectionField making it always get the
raw queryset from the model to apply the filters in it.
This makes sure that the DjangoObjectType's .get_queryset is called,
keeping any filtering it might have made.
====
I noted this when trying to update my extension (https://github.com/0soft/graphene-django-plus/tree/master/graphene_django_plus) to work with 2.7.0 and seeing some tests failing. There I override DjangoObjectType's get_queryset method to add some permissioning checks and my tests broke when a query that should only return some objects that the test user had access returned everything.
Fixes #815